package com.yt.app.provider.dao.impl;

import com.yt.app.core.model.AppBanner;
import com.yt.app.provider.dao.AppBannerDao;
import com.yt.core.dao.GenericDaoImpl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by liujunshi on 16-1-22.
 */
public class AppBannerDaoImpl extends GenericDaoImpl<AppBanner, Long> implements AppBannerDao {
	public AppBannerDaoImpl() {
		setNameSpace("com.yt.app.appbanner");
	}

	public List<AppBanner> getValidBannerList(Integer type){
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("type", type);
		params.put("dateline", System.currentTimeMillis()/1000);
		return this.getSqlSession().selectList(this.getNameSpace() + ".findValidBanner", params);
	}
}
